<script>
export default {
  name: 'AddListData',
  data(){
    return {
      drawer: false,
      form: {
        name: null,
        age: null,
        height: null,
        weight: null,
        movement: null
      },
      rule: {

      },
    }
  },
  methods:{
    submitData(){
      this.$emit('submit',this.form)
    }
  }
}
</script>

<template>
  <div>
    <el-drawer
      title="我是标题"
      :visible.sync="drawer"
      direction="rtl"
      size="50%"
    >
      <el-form
        :model="form"
        ref="form"
        :rules="rule"
        label-position="right"
        label-width="80px"
      >
       <el-form-item label="姓名">
         <el-input  v-model="form.name" placeholder="请输入姓名"/>
       </el-form-item>
       <el-form-item label="年龄">
         <el-input  v-model="form.age" placeholder="请输入年龄"/>
       </el-form-item>
       <el-form-item label="身高">
         <el-input  v-model="form.height" placeholder="请输入身高"/>
       </el-form-item>
       <el-form-item label="体重">
         <el-input  v-model="form.weight" placeholder="请输入体重"/>
       </el-form-item>
       <el-form-item label="运动项目">
         <el-input  v-model="form.movement" placeholder="请选择运动"/>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" @click="submitData">确 定</el-button>
       </el-form-item>
      </el-form>
    </el-drawer>
  </div>
</template>

<style scoped>

</style>
